-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Have set_hold_position() actually stop the robot #684
Conversation
joint_trajectory_controller/src/joint_trajectory_controller.cpp
Outdated
Show resolved
Hide resolved
joint_trajectory_controller/src/joint_trajectory_controller.cpp
Outdated
Show resolved
Hide resolved
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## master #684 +/- ##
==========================================
+ Coverage 35.78% 36.68% +0.90%
==========================================
Files 189 7 -182
Lines 17570 676 -16894
Branches 11592 357 -11235
==========================================
- Hits 6287 248 -6039
+ Misses 994 134 -860
+ Partials 10289 294 -9995
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Print comment as debug statement Co-authored-by: Bence Magyar <[email protected]>
Partial to #558 as it has tests... |
I had a detailed look: I think this one here does not solve the problem for all interface combinations: it sets command-interfaces of velocity/effort to zero at the end of the update method -> a position hold is not guaranteed, because the PIDs' outputs will be overriden. |
Closing in favor of #613 |
Addresses #683
In almost all cases, that a trajectory doesn't return a valid point implies that
set_hold_position()
(which defines an empty trajectory with no valid points) has been called somewhere. We should stop the robot in this case.Note the existing TODO that it is unclear how to stop an effort-controlled robot.
Note also that we should not reach this code under any other circumstance, since all incoming trajectories are validated before copied to the realtime pointer. Therefore, reaching this code without
set_hold_position()
implies a bug in our validation code, and I would argue stopping the robot is reasonable behavior.To send us a pull request, please:
colcon test
andpre-commit run
(requires you to install pre-commit bypip3 install pre-commit
)